
<script language="javascript">
    $(document).ready(function(){
        $('div').removeClass('text');
           $('#NewsletterSubscribeForm').submit(function(){
               
               var email=$('#newsletteremail').val();
            if(!isEmail($('#newsletteremail').val())){
                $("#nemail_err").css("display","block");
                $("#nemail_err").html('Invalid email').delay(5000).fadeOut(1500);
                return false;
               
            }else{
                $.ajax({
                    url:'<?php echo $this->base; ?>/Newsletters/subscribe',
                    type:'POST',
                    data:{email:email},
                    success:function(response){
                        $.fancybox('<div id="login_register" class="register-form"><h2>'+email+'</h2><span style="font-weight:bold;font-size:16px;">'+response+'</h3></div>',
		{
        		'autoDimensions'	: false,
			'width'         		: 'auto',
			'height'        		: 'auto',
			'transitionIn'		: 'none',
			'transitionOut'		: 'none'
                        
		}
	);
            
                    }
                });
                return false;
            }
            return false;
           });
           
    }
);
    
    
    function isEmail(email){
        var regex = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
            if(regex.test(email)){
                return true
            } else{
                return false;
            }
    }</script>
<?php echo $this->Html->css('front/inner'); ?>
<div class="comming-soon">
      <h1>The Universe Will Be Quantified. Launching October 2011...</h1>
      <h2>Subscribe by entering your e-mail below</h2>
     <?php 
       echo $this->Form->create('Newsletter',array('action'=>'subscribe'));
       echo $this->Form->input('email',array('label'=>'','class'=>'input-','id'=>'newsletteremail','AUTOCOMPLETE'=>"OFF",'value'=>'Enter your e-mail address','onclick'=>'this.value=""'));
       echo $this->Form->end(array('class'=>'input-button-submit','label'=>''));
      
      ?>
     
      <div id="nemail_err"></div>
      <h3>Follow us on:</h3>
      <ul>
          <li class="facebook"><?php echo $this->Html->link('','http://facebook.com/RateTheUniverse',array('target'=>'_blank')); ?></li>
          <li class="twitter"><?php echo $this->Html->link('','http://www.twitter.com/RateTheU',array('target'=>'_blank')); ?></li>
      	
        
      </ul>
    </div>